#ifndef __EPOLL_H_
#define __EPOLL_H_

#include <sys/epoll.h>
#include "like.h"
#include "data_packet.h"

int epoll_init(int size);
int epoll_ctl_link(int fd,int root_fd,struct epoll_event ep);
int eproot_add_fd(int connfd,int root_fd,struct epoll_event ep);
void epoll_ctl_del(int sockfd,int root_fd,userinfo *head);

int register_operation(int connfd,char *buff,user_data data,userinfo *head);
void send_socket(int sockfd,userinfo *head);
void send_register_erron(int socket);
void public_catinfo_post(int sockfd, public_cat_packet packet,char *buf);
void private_catinfo_post(int sockfd,chat_packet packet,userinfo *head,char *buf);
int on_line_updata(userinfo *head);
void send_file_error(int fd);


#endif
